<tagLib name="strends" />
<include file="Public:header" />
<style>
	#mainnav,#smallnav{margin-top:20px;}
	#mainnav ul li {line-height:45px;background:#304E8E;border:2px solid gray;font-size:14px;color:white;text-align:center;cursor:pointer;}

</style>
<script>
	$(function(){
		$("#mainnav li:first-child").css({'background':'#3C6ABD','border-right':'none'});
	});
	function turnnav(cate){
		$("#mainnav ."+cate+"").css({'background':'#3C6ABD','border-right':'none'});
		$("#mainnav ."+cate+"").siblings().css({'background':'#304E8E','border-right':'2px solid gray'});
		$("#smallnav ."+cate+"").show();
		$("#smallnav ."+cate+"").siblings().hide();
	}	
</script>
<form method='post' id="form" name="form" action="{:U(MODULE_NAME.'/insert')}"  enctype="multipart/form-data">
	<div id='mainnav' style='border-radius:2px;float:left;'>
		<ul>
			<volist name='nav' id='vo'>
			<li class='{$key}' onclick="turnnav('{$key}')">{$vo}</li>
			</volist>
		</ul>
	</div>
	<div id='smallnav' style='width:90%;border:1px solid gray;border-left:none;float:left;'>
	<volist name='configs' id='vo' key='k'>
	<if condition="$k eq 1">
	<div class='{$key}'>
		<ul style='clear:both;'>
			<volist name='vo' id='v'>
			<li>
				<div style='float:left;margin:0px 0px 10px 10px;'>
				{$v}:<br/>
				标题：<input type='text' name="{$v}_text" value="{$rules[$v]}"><br/>
				<if condition="($v eq 'btn_db_sm') OR ($v eq 'btn_db_tm')">
				<strends:editor id="{$v}" name="{$v}_info" type="CKEDITOR" toolbar="Self" width="96%" height="130px" content="{$ppost[$v]['info']}" />
				<else />
				图片：<input type='file' name="{$v}_url" value="{$ppost[$v]['url']}">{$ppost[$v]['url']}<br/>
				<textarea style='width:330px;height:70px;' name="{$v}_info">{$ppost[$v]['info']}</textarea>
				</if>
				</div>
			</li>
			</volist>
		</ul>
	</div>
	<else />
	<div class='{$key}' style='display:none;'>
		<ul style='clear:both;'>
			<volist name='vo' id='v'>
			<li>
				<div style='float:left;margin:0px 0px 10px 10px;'>
				{$v}:<br/>
				标题：<input type='text' name="{$v}_text" value="{$rules[$v]}"><br/>
				<if condition="($v eq 'btn_db_sm') OR ($v eq 'btn_db_tm')">
				<strends:editor id="{$v}" name="{$v}_info" type="CKEDITOR" toolbar="Self" width="96%" height="130px" content="{$ppost[$v]['info']}" />
				<else />
				图片：<input type='file' name="{$v}_url" value="{$ppost[$v]['url']}">{$ppost[$v]['url']}<br/>
				<textarea  style='width:330px;height:70px;' name="{$v}_info">{$ppost[$v]['info']}</textarea>
				</if>
				</div>
			</li>
			</volist>
		</ul>
		<if condition="$k eq 12">
		<br/><input type="submit" value="提交" class="submit_btn" style="margin-left:40%;">（信息量较大，请确认数据没有错误再提交！）
		</if>
	</div>
	</if>
	</volist>
	</div>
</form>
<include file="Public:footer" />
		